<div class="page-body">
    <div class="row">
        <div class="widget">
            <div class="widget-body">
                <div id="horizontal-form">
                    <form class="form-horizontal" role="form"
                          action="{:U('doEdit',array('book_id'=>$data['book_id']))}"
                          method="post" enctype="multipart/form-data">
                        <div class="form-group">
                            <label for="sm" class="col-sm-3 control-label no-padding-right">书名：</label>
                            <div class="col-sm-3">
                                <input type="text" class="form-control" id="sm" name="sm" value="{$data.sm}" required>
                            </div>
                        </div>
                        <volist name="book_type" id="vo">
                            <div class="form-group   ">
                                <label class="col-sm-3 control-label no-padding-right">{$vo.name}：</label>
                                <div class="col-sm-3">
                                    <select class="form-control" name="type_id[]">
                                        <option value="0">请选择分类</option>
                                        <volist name="vo.child" id="v">
                                            <empty name="v.selected">
                                                <option value="{$v.type_id}">{$v.name}</option>
                                                <else/>
                                                <option value="{$v.type_id}" selected>{$v.name}</option>
                                            </empty>
                                        </volist>
                                    </select>
                                </div>
                            </div>
                        </volist>
                        <div class="form-group   ">
                            <label class="col-sm-3 control-label no-padding-right">新华码（唯一码）：</label>
                            <div class="col-sm-3">
                                <input type="number" name="spbs" class="form-control" value="{$data.spbs}" required>
                            </div>
                        </div>
                        <div class="form-group   ">
                            <label class="col-sm-3 control-label no-padding-right">条码：</label>
                            <div class="col-sm-3">
                                <input type="number" name="tm" class="form-control" value="{$data.tm}">
                            </div>
                        </div>
                        <div class="form-group   ">
                            <label class="col-sm-3 control-label no-padding-right">作者：</label>
                            <div class="col-sm-3">
                                <input type="text" name="zyz" class="form-control" value="{$data.zyz}">
                            </div>
                        </div>
                        <div class="form-group   ">
                            <label class="col-sm-3 control-label no-padding-right">定价：</label>
                            <div class="col-sm-3">
                                <input type="tel" name="dj" class="form-control" value="{$data.dj}" required>
                            </div>
                        </div>
                        <div class="form-group   ">
                            <label class="col-sm-3 control-label no-padding-right">版别：</label>
                            <div class="col-sm-3">
                                <input type="text" name="bb" class="form-control" value="{$data.bb}">
                            </div>
                        </div>
                        <div class="form-group   ">
                            <label class="col-sm-3 control-label no-padding-right">排序：</label>
                            <div class="col-sm-3">
                                <input type="number" name="sort" class="form-control" value="{$data.sort|default=0}">
                            </div>
                            <div class="col-sm-6">
                                <span class="danger">注意：>0时会显示在首页店长推荐，并从大到小排</span>
                            </div>
                        </div>
                        <div class="form-group   ">
                            <label class="col-sm-3 control-label no-padding-right">封面：</label>
                            <div class="col-sm-3">
                                <input type="file" name="b_logo">
                                <notempty name="data.b_logo">
                                    <img src="{$data.b_logo}" height="100">
                                </notempty>
                            </div>
                        </div>
                        <div class="form-group   ">
                            <label class="col-sm-3 control-label no-padding-right">推荐语：</label>
                            <div class="col-sm-3">
                                <textarea name="b_rec" class="form-control" rows="3">{$data.b_rec}</textarea>
                            </div>
                        </div>
                        <div class="form-group   ">
                            <label class="col-sm-3 control-label no-padding-right">图文详情：</label>
                            <div class="col-sm-9">
                                <script id="editor" type="text/plain" style="width:100%;min-height:500px;">
                                    {$data.bdetail}
                                </script>
                            </div>
                        </div>
                        <div class="form-group  ">
                            <div class="col-sm-offset-3 col-sm-10">
                                <button type="submit" class="btn btn-primary">提 交</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript" charset="utf-8" src="/admin/js/ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="/admin/js/ueditor/ueditor.all.min.js"></script>
<!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
<!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
<script type="text/javascript" charset="utf-8" src="/admin/js/ueditor/lang/zh-cn/zh-cn.js"></script>
<script>
    $(document).ready(function () {
        //实例化编辑器
        //建议使用工厂方法getEditor创建和引用编辑器实例，如果在某个闭包下引用该编辑器，直接调用UE.getEditor('editor')就能拿到相关的实例
        var ue = UE.getEditor('editor');
    });
</script>